﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Site_By_LIVE_Date : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        MyReportViewer.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote;
        MyReportViewer.ServerReport.ReportServerUrl = new Uri("http://cgillin/ReportServer_MSSQL2012/"); // Report Server URL
        MyReportViewer.ServerReport.ReportPath = "/LIVE Site Implementation By Date"; // Report Name
        MyReportViewer.ShowParameterPrompts = true;
        MyReportViewer.ShowPrintButton = true;

        // Below code demonstrate the Parameter passing method. User only if you have parameters into the reports.
        //Microsoft.Reporting.WebForms.ReportParameter[] reportParameterCollection = new Microsoft.Reporting.WebForms.ReportParameter[1];
        //reportParameterCollection[0] = new Microsoft.Reporting.WebForms.ReportParameter();
        //reportParameterCollection[0].Name = DistinctSite.Constants.Pages.ClientAdmin.ShowInvoice.QueryStrings.INVOICEID;
        //reportParameterCollection[0].Values.Add(Request.QueryString[DistinctSite.Constants.Pages.ClientAdmin.ShowInvoice.QueryStrings.INVOICEID].ToString());
        //MyReportViewer.ServerReport.SetParameters(reportParameterCollection);

        //MyReportViewer.ServerReport.Refresh();
    }
}